// db.js
const mysql = require('mysql2');

const pool = mysql.createPool({
  host: 'rm-2ze09cbfu9380jv0r.mysql.rds.aliyuncs.com',  // 修改为阿里云RDS连接地址
  user: 'root',
  database: 'l4-db1',
  password: 'Lq114514',
  port: 3306,
  waitForConnections: true,
  connectionLimit: 10,
  queueLimit: 0
});

module.exports = pool.promise();